<extend name="Layout:layout_dialog" />
<block name="body_main">
    <div class="ui-tabs ui-widget ui-widget-content">
        <ul class="ui-tabs-nav ui-helper-clearfix ui-widget-header">
            <li class="ui-state-default ui-corner-top ui-state-active"><a href="{:U('profile_edit')}" class="ui-tabs-anchor" >个人资料</a></li>
            <li class="ui-state-default ui-corner-top"><a href="{:U('User/password_edit')}" class="ui-tabs-anchor" >更改密码</a></li>
        </ul>
    </div>
    <form action="{:U('profile_edit_save')}" method="post" class="xsui-form" enctype="multipart/form-data">
        <fieldset>
            <div class="xsui-form-field">
                <label>用户名：</label>
                <if condition="$data['user_name']">
                    {$data.user_name}
                    <else/>
                    <input type="text" name="user_name" placeholder="用户名" value="{$data.user_name}" required="required" />
                    <input type="hidden" name="password" value="123456" />
                </if>
            </div>
            <div class="xsui-form-field">
                <label>照片：</label>
                <input type="file" name="face_url" />
            </div>
            <div class="xsui-form-field">
                <label>姓名：</label>
                <input type="text" name="name" value="{$data.name}" placeholder="姓名" />
            </div>
            <div class="xsui-form-field">
                <label>手机号码：</label>
                <input type="text" name="mobile" value="{$data.mobile}" placeholder="手机号码" />
            </div>
            <div class="xsui-form-field">
                <label>Email：</label>
                <input type="text" name="email" value="{$data.email}" placeholder="电子邮件" />
            </div>
            <div class="xsui-form-field">
                <label>来电弹屏模式：</label>
                <sohtml:radio name="screenpopup_mode" items="D:直接弹屏;M:消息提醒" value="{$data.screenpopup_mode|default=M}" required="required" />
            </div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
    </form>    
</block>